.class public Lcom/htc/android/footprints/kml/KMLPlacemark;
.super Ljava/lang/Object;
.source "KMLPlacemark.java"


# static fields
.field public static final EXT_ACCURACY:Ljava/lang/String; = "accuracy"

.field public static final EXT_AUDIO:Ljava/lang/String; = "audio"

.field public static final EXT_CATEGORY:Ljava/lang/String; = "category"

.field public static final EXT_COMMENT:Ljava/lang/String; = "comment"

.field public static final EXT_CREATE_TIME:Ljava/lang/String; = "create_time"

.field public static final EXT_FOOTPRINT_ID:Ljava/lang/String; = "footprintid"

.field public static final EXT_IMAGE:Ljava/lang/String; = "image"

.field public static final EXT_RATE:Ljava/lang/String; = "rate"

.field public static final EXT_VERSION:Ljava/lang/String; = "version"

.field public static final EXT_WEBSITE:Ljava/lang/String; = "website"


# instance fields
.field public address:Ljava/lang/String;

.field private description:Ljava/lang/String;

.field public extendData:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public latitudeE6:I

.field public longitudeE6:I

.field public name:Ljava/lang/String;

.field public phoneNumber:Ljava/lang/String;

.field public final style:Ljava/lang/String;

.field public when:J


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 28
    const-string v0, "#iconStyle"

    iput-object v0, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->style:Ljava/lang/String;

    .line 37
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->extendData:Ljava/util/HashMap;

    return-void
.end method


# virtual methods
.method public getDescription()Ljava/lang/String;
    .locals 7

    .prologue
    const-string v6, ""

    .line 58
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    .line 59
    .local v1, sb:Ljava/lang/StringBuilder;
    const-string v4, "<![CDATA["

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 60
    iget-object v4, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->extendData:Ljava/util/HashMap;

    const-string v5, "image"

    invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 61
    .local v0, imgPath:Ljava/lang/String;
    if-eqz v0, :cond_0

    const-string v4, ""

    invoke-virtual {v0, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_0

    .line 62
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "<img src=\""

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\" width=\"192px\"/>"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 63
    const-string v4, "<br/>"

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 66
    :cond_0
    iget-object v4, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->description:Ljava/lang/String;

    if-eqz v4, :cond_1

    .line 67
    iget-object v4, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->description:Ljava/lang/String;

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 70
    :cond_1
    iget-object v4, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->extendData:Ljava/util/HashMap;

    const-string v5, "website"

    invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 71
    .local v3, webSite:Ljava/lang/String;
    if-eqz v3, :cond_2

    const-string v4, ""

    invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_2

    .line 73
    const-string v4, "http"

    invoke-virtual {v3, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_3

    .line 74
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "http://"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 78
    .local v2, url:Ljava/lang/String;
    :goto_0
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "<br/><a href=\""

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "\">"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 79
    invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "</a>"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 81
    .end local v2           #url:Ljava/lang/String;
    :cond_2
    const-string v4, "]]>"

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 82
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    return-object v4

    .line 76
    :cond_3
    move-object v2, v3

    .restart local v2       #url:Ljava/lang/String;
    goto :goto_0
.end method

.method public getExtendData(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .parameter "key"

    .prologue
    .line 89
    iget-object v0, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->extendData:Ljava/util/HashMap;

    invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljava/lang/String;

    return-object p0
.end method

.method public getOriginalDescription()Ljava/lang/String;
    .locals 1

    .prologue
    .line 55
    iget-object v0, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->description:Ljava/lang/String;

    return-object v0
.end method

.method public setExtendData(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter "key"
    .parameter "value"

    .prologue
    .line 85
    iget-object v0, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->extendData:Ljava/util/HashMap;

    invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 86
    return-void
.end method

.method public setTextDescription(Ljava/lang/String;)V
    .locals 0
    .parameter "description"

    .prologue
    .line 51
    iput-object p1, p0, Lcom/htc/android/footprints/kml/KMLPlacemark;->description:Ljava/lang/String;

    .line 52
    return-void
.end method
